import Mock from 'mockjs';

let activitylist = [{
    activityId: 12603,
    activityName: "21414",
    endTime: "2020-11-30",
    gameIssueTime: 1607097600000,
    gameName: "武仙（满V版）(苹果)",
    onlineStatus: 1,
    startTime: "2020-11-27",
    status: "进行中",
    type: 1,
    validity: "2020-11-30~2020-12-02"
  },
  {
    activityId: 12603,
    activityName: "21414",
    endTime: "2020-11-30",
    gameIssueTime: 0,
    gameName: "武仙（满V版）(苹果)",
    onlineStatus: 1,
    startTime: "2020-11-27",
    status: "进行中",
    type: 0,
    validity: "2020-11-30~2020-12-02"

  }, {
    activityId: 12603,
    activityName: "21414",
    endTime: "2020-11-30",
    gameIssueTime: 0,
    gameName: "武仙（满V版）(苹果)",
    onlineStatus: 1,
    startTime: "2020-11-27",
    status: "进行中",
    type: 0,
    validity: "2020-11-30~2020-12-02"
  }
]
// 搜索数据
let searchList = [
  [{
    id: 1,
    label: '全部'
  }, {
    id: 2,
    label: '游戏游戏111'
  }, {
    id: 3,
    label: '游戏游戏游戏游戏'
  }, {
    id: 4,
    label: '游戏游戏'
  }],
  [{
    id: 1,
    label: '全部'
  }, {
    id: 2,
    label: '游戏咨询'
  }, {
    id: 3,
    label: '官方动态'
  }, {
    id: 4,
    label: '游戏攻略'
  }]
];
let addList = {
  games: [{
    id: 1,
    label: '大话西游'
  }, {
    id: 2,
    label: '游戏游戏111'
  }, {
    id: 3,
    label: '游戏游戏游戏游戏'
  }, {
    id: 4,
    label: '游戏游戏'
  }],
  
}

export default {
  getActivityList: config => { //列表数据
    return {
      code: 200,
      data: {
        total: 10,
        list: activitylist
      }
    }
  },
  getSearchList: config => { //搜索数据
    return {
      code: 200,
      data: {
        total: 10,
        list: searchList
      }
    }
  },
  getAddactData: config => { //添加活动数据
    return {
      code: 200,
      data: {
        list: addList
      }
    }
  },
  submitAddactivity: config => { //提交添加活动表单
    return {
      code: 200,
      data: {
        config
      }
    }
  },
  getActivityDetail: config => {
    return {
      "code": "200",
      "msg": "请求成功",
      "data": {
        "list": [{
            "activityCouponId": 17, // 优惠券-活动组合id
            "totalNum": 213, // 发放总数
            "remainNum": 213, // 剩余总数
            "usedNum": 0, // 使用总数
            "couponName": "满减券", // 优惠券名称
            "couponType": "满减券", // 优惠券类型
            "description": "满100减10元", // 优惠描述
            "takeNum": 0 // 领取总数
          },
          {
            "activityCouponId": 16,
            "totalNum": 123,
            "remainNum": 123,
            "usedNum": 0,
            "couponName": "无门槛",
            "couponType": "无门槛券",
            "description": "抵扣10元",
            "takeNum": 0
          }
        ]
      }
    }
  },
  getActivityCouponSupply: config => {
    return {
      "code": "200",
      "msg": "请求成功",
      "data": null
    }
  },
  activityOffline: config => {
    return {
      code: 200,
      msg: "请求成功",
      data: null
    }
  },
  activityOnline: config => {
    return {
      code: 200,
      msg: "请求成功",
      data: null
    }
  }
}
